<template>
    <view>
        <!-- template对应的原始代码，为保证正常显示，已对其进行隐藏。 -->
        <block name="newsDetailTpl" v-if="false">
            <view v-if="isLoad === null" class="margin-top load notexist text-l load-project"></view>
            <view v-if="isLoad === false" class="margin-top load loading text-l load-project"></view>

            <view v-if="isLoad" class="main padding-project">
                <view v-if="news.NEWS_TYPE == 0" class="article-box margin-top-xs">
                    <!-- article content begin -->
                    <view class="article card-project shadow-project">
                        <view class="title">
                            <text :user-select="true">{{ news.NEWS_TITLE }}</text>
                        </view>
                        <view class="time">{{ news.NEWS_ADD_TIME }} {{ news.NEWS_CATE_NAME }}</view>

                        <block v-for="(item, index) in news.NEWS_CONTENT" :key="index">
                            <view class="content" v-if="item.type == 'text'">
                                <text :user-select="true">{{ item.val }}</text>
                            </view>

                            <view class="pics" v-if="item.type == 'img'">
                                <image
                                    @tap="url"
                                    data-type="img"
                                    :data-url="item.val"
                                    :show-menu-by-longpress="true"
                                    class="loading"
                                    mode="widthFix"
                                    :lazy-load="true"
                                    :src="item.val"
                                ></image>
                            </view>
                        </block>
                        <!-- article content end -->
                    </view>
                    <!-- article content end -->
                </view>

                <web-view v-if="news.NEWS_TYPE == 1" :src="news.NEWS_URL"></web-view>
            </view>
        </block>
    </view>
</template>

<style>
@import './news_detail_tpl.css';
</style>
